'use strict';

/*
 * @Description:
 * @Author: Mr.Wen
 * @Version: v1.0.0
 * @Date: 2022-07-30 10:38:17
 * @LastEditors: Mr.Wen - 文先生
 * @LastEditTime: 2022-08-26 11:40:15
 */

const express = require('express');
const router = express.Router();

/**
 *
 * method：GET
 * params：无
 */
router.get('/web/menu', (req, res) => {
  let menuData = [
    {
      path: '/member/manage',
      name: '/member/manage',
      icon: 's-tools',
      meta: { title: '会员管理' },
      sort: 0,
      alwaysShow: true,
      enabled: true,
      type: 'menu',
      createTime: '2022-08-04 14:27:50',
      updateTime: '2022-08-04 14:27:55',
      component: 'Layout',
      redirect: '/member/manage/center',
      children: [
        {
          path: 'center',
          name: 'center',
          icon: 's-tools',
          meta: { title: '会员中心' },
          component: 'pages/member/center',
          enabled: true,
          sort: 0,
          type: 'menu',
          createTime: '2022-08-04 14:27:50',
          updateTime: '2022-08-04 14:27:55',
        },
        {
          path: 'setup',
          name: 'setup',
          icon: 's-tools',
          meta: { title: '会员设置' },
          component: 'pages/member/setup',
          enabled: true,
          sort: 0,
          type: 'button',
          createTime: '2022-08-04 14:27:50',
          updateTime: '2022-08-04 14:27:55',
        },
      ],
    },
    {
      path: '/authority/manage',
      name: '/authority/manage',
      icon: 's-tools',
      meta: { title: '权限管理' },
      sort: 0,
      alwaysShow: true,
      enabled: true,
      type: 'menu',
      createTime: '2022-08-04 14:27:50',
      updateTime: '2022-08-04 14:27:55',
      children: [
        {
          path: 'member/setup',
          name: 'member/setup',
          icon: 's-tools',
          meta: { title: '设置' },
          component: 'Login/index.vue',
          enabled: true,
          sort: 0,
          type: 'button',
          createTime: '2022-08-04 14:27:50',
          updateTime: '2022-08-04 14:27:55',
        },
      ],
    },
  ];

  let json = {
    code: 200,
    status: 0,
    message: '操作成功',
    url: req.originalUrl,
    result: menuData,
  };

  res.send(json);
  return;
});

module.exports = router;
